home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13805 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  40 lines

  1. Newsgroups: comp.object,comp.lang.eiffel,comp.lang.c++,comp.lang.beta,comp.lang.java,comp.lang.sather
  2. Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
  3. From: shang@corp.mot.com (David L. Shang)
  4. Subject: Re: What Should An Exception Handling Do? -- Clarification of rules
  5. Reply-To: shang@corp.mot.com
  6. Organization: MOTOROLA 
  7. Date: Wed, 27 Mar 1996 13:48:00 GMT
  8. Message-ID: <1996Mar27.134800.18605@schbbs.mot.com>
  9. References: <4j948d$t3d@trumpet.uni-mannheim.de>
  10. Sender: news@schbbs.mot.com (SCHBBS News Account)
  11. Nntp-Posting-Host: 129.188.128.126
  12.  
  13. In article <4j948d$t3d@trumpet.uni-mannheim.de> mw@ipx2.rz.uni-mannheim.de  
  14. (Marc Wachowitz) writes:
  15. > David L. Shang (shang@corp.mot.com) wrote:
  16. > > But an exception is not necessarily an error. Sometimes it is an
  17. > > condition that requires some extraordinary computation, a condition
  18. > > that is not supposed for a regular case, [...]
  19. > Let's look at the problem with fresh eyes, without thinking immediately
  20. > about using the technical feature called "exception" in a few programming
  21. > languages.
  22. > Some routine (often supposed to be reused for different contexts) wants
  23. > the "advice" of its caller (or the caller's caller etc.) how to handle an
  24. > unusual condition ("advice" might imply activities, like a user query).
  25.  
  26. Couldn't agree more. That is what an exception handling is supposed to
  27. do, and that is the case where exception handling is helpful. Back to
  28. my original post, I analyzed two cases for exception handling:
  29.  
  30. * the callee decides how to handle the exception; and
  31. * the caller decides how to handle the exception;
  32.  
  33. And I concluded that the second case is more important and useful.
  34.  
  35. David Shang
  36.  
  37.